/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.component.gateway.socket.protocol;

import cn.hutool.core.util.StrUtil;
import info.peigen.hotpot.component.gateway.core.util.HexUtil;
import lombok.extern.slf4j.Slf4j;
import org.noear.solon.annotation.Component;
import org.smartboot.socket.transport.AioSession;

/**
 * <b>(SocketProtocol)</b>
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2023/1/9
 */
@Slf4j
@Component("socketProtocol")
public class SocketProtocol<T> extends AbstractSocketProtocol<T> {
    @Override
    protected T decode(String hexStr, AioSession session) {
        hexStr = StrUtil.removeAny(hexStr, "[ ", " ]", " ");
        String bitStr = HexUtil.hexToBinary(hexStr);
        // 点蓝
        log.error("该协议未实现!协议内容:{}", bitStr);
        return null;
    }
}